<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
	<include file="Inc/basic_css"/>
	<include file="Inc/basic_js"/>
	<import type="js" basepath="__JS__" file="AjaxFileUpload,imgpre,admin" />
	<import type="js" basepath="__PLUGIN__" file="ueditor.ueditor#config,ueditor.ueditor#all#min,ueditor.lang.zh-cn.zh-cn" />
	<link rel="stylesheet" type="text/css" href="__PLUGIN__/bootstrap-datepicker/css/datepicker.css" />
	<script type="text/javascript" src="__PLUGIN__/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>

</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN HEADER -->
<include file="Inc/head"/>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
	<!-- BEGIN SIDEBAR -->
	<include file="Inc/left"/>
	<!-- END SIDEBAR -->
	<!-- BEGIN PAGE -->
	<div class="page-content">

		<!-- BEGIN STYLE CUSTOMIZER -->
		<include file="Inc/theme"/>
		<!-- END BEGIN STYLE CUSTOMIZER -->
		<!-- BEGIN PAGE HEADER-->
		<div class="row">
			<div class="col-md-12">
				<!-- BEGIN PAGE TITLE & BREADCRUMB-->
				<h3 class="page-title">
					{$cfg.title}<if condition="$dataInfo.id gt 0 ">修改信息<else />添加信息</if> <small></small>
				</h3>
				<ul class="page-breadcrumb breadcrumb">
					<li><i class="fa fa-home"></i><a href="{:U('Index/index')}">首页</a> <i class="fa fa-angle-right"></i></li>
					<li><a href="#">信息系统</a><i class="fa fa-angle-right"></i></li>
					<li><a href="#">多图管理</a></li>
				</ul>					<!-- END PAGE TITLE & BREADCRUMB-->
			</div>
		</div>
		<!-- END PAGE HEADER-->
		<!-- BEGIN PAGE CONTENT-->
		<div class="row">
			<div class="col-md-12">
				<!-- BEGIN EXAMPLE TABLE PORTLET-->
				<div class="portlet">
					<!--
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-reorder"></i>站点信息
                        </div>
                    </div>-->
					<form class="form-horizontal" action="{:U('Photo/save')}" method="post" id="submit_form">
						<input type="hidden" name="id" value="{$dataInfo.id}" />
						<input type="hidden" name="table_name" value="{$table_name}" />
						<input type="hidden" name="belong_id" value="{$belong_id}" />
						<input type="hidden" name="back_url" value="{$back_url}" />
						<input type="hidden" name="language" value="{:cookie('AUTH_USER_LANG')}" />

						<div class="portlet-body form">
							<!-- BEGIN FORM-->
							<div class="form-body">

								<div class="form-group">
									<label class="col-md-3 control-label">所属栏目：</label>
									<div class="col-md-4">
										<input readonly="readonly" type="text" class="form-control"  value="{$PInfo.title}"/>
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-3 control-label">图片标题：</label>
									<div class="col-md-4">
										<input type="text" class="form-control" name="title" id="title" value="{$dataInfo.title}"/>
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-3 control-label">排序：</label>
									<div class="col-md-4">
										<input type="text" class="form-control" name="list_order" id="list_order" value="<if condition="$dataInfo.list_order gt 0"> {$dataInfo.list_order}<else/>10</if>"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-3 control-label">是否显示：</label>
									<div class="col-md-4">
										<select class="form-control input-medium" name="islock" id="islock">
											<option value="1"<if condition="$dataInfo.islock eq 1"> selected</if>>显示</option>
											<option value="2"<if condition="$dataInfo.islock eq 2"> selected</if>>锁定</option>
										</select>
									</div>
								</div>

								<input type="hidden" name="pic_path" value="{$dataInfo.pic_path}" />
								<input type="hidden" name="value_mark" value="{$fileType}" />
								<div class="form-group">
									<label class="col-md-3 control-label">图片：</label>
									<div class="col-md-4" id="{$fileType}_upload">
										<input type="button" value="上传图片" class="btn blue zy-upload" />
										<div id="{$fileType}_upload"></div>
									</div>
								</div>

							</div>
						</div>
						<style>
							.tulist{ width:100%;  padding-top:5px; border-top:2px solid #999;}
							.tulist dl{ width:100px; height:110px; float:left; padding:0 0px 0 7px; margin:0px; position:relative;}
							.tulist dl dt{ width:100px; padding:0px; margin:0px; text-align:center;}
							.tulist dl dd{ width:100px; height:22px; line-height:22px; word-spacing:23px; padding:0px; margin:0px; text-align:center;}
							.tulist dl dt .zt1{ position:absolute; right:0px; top:0; color:#fff; padding:0 2px; background-color:#060;}
							.tulist dl dt .zt2{ position:absolute; right:0px; top:0; color:#fff; padding:0 2px; background-color:red;}
							.fenye{ width:100%; clear:both; text-align:center;}
							.fenye table{ text-align:center;}

						</style>
						<div class="tulist" id="tulist">
							<foreach name="list" item="item">
								<dl>
									<dt><if condition="$item.islock eq 1"><span class="zt1">正常</span><else/><span class="zt2">锁定</span></if><a href="__UPLOAD__/{$item.pic_path}" title="111" target="_blank"><img src="{$upload}/{$item.pic_path}" width="100" height="80" alt="111" /></a></dt>
									<dd><a href="{:U('Photo/index?table_name='.$item['table_name'].'&belong_id='.$item['belong_id'].'&fileType='.$fileType.'&id='.$item['id'].'')}" class="s1">编辑</a>
										<a style="cursor:pointer;" rel="{:U('Photo/delList?table_name='.$item['table_name'].'&belong_id='.$item['belong_id'].'&fileType='.$fileType.'&id='.$item['id'].'')}"  onclick="Confirm_ajax($(this).attr('rel'),'确认要删除么？');"  title="删除" class="s2">删除</a></dd>
								</dl>
							</foreach>
						</div>
						<div class="form-actions top fluid ">
							<div class="col-md-offset-3 col-md-9">
								<button class="btn green" type="submit">保存</button>
								<button class="btn default" type="button" id="cancel" onclick="history.go(-1)">返回</button>
							</div>
						</div>

					</form>
					<!-- END FORM-->

					<div id="classUp" class="uploadFile"><a href="javascript:;" class="zy-close"><i class="fa icon-close">关闭</i></a></div>

				</div>
			</div>
			<!-- END EXAMPLE TABLE PORTLET-->
		</div>
	</div>
	<!-- END PAGE CONTENT -->
</div>

<div class="fenye">{$page}</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<include file="Inc/foot"/>
<!-- END FOOTER -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->

<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->

<!-- 引用控制层插件样式 -->
<link rel="stylesheet" href="__JS__/uploadsFile/control/css/uploadsFile.css" type="text/css">
<!-- 引用核心层插件 -->
<script type="text/javascript" src="__JS__/uploadsFile/core/uploadsFile.js"></script>
<!-- 引用控制层插件 -->
<script type="text/javascript" src="__JS__/uploadsFile/control/js/uploadsFile.js"></script>


<script src="__JS__/app.js" type="text/javascript"></script>
<script src="__JS__/form-components.js"></script>
<script src="__JS__/controllers/photo/view.js" type="text/javascript"></script>
<script src="__JS__/AjaxList.js.php"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
	jQuery(document).ready(function() {
		//App.init(); // initlayout and core plugins
		NewValidation.init();
		//FormComponents.init();
	});
</script>
<script>
	jQuery(document).ready(function() {
		App.init(); // initlayout and core plugins
		FormComponents.init();
	});
	$(function(){
		//显示组件
		$('.zy-upload').click(function (){
			var UpFileUrl = '{:urlencode("__JS__/uploadsFile/")}';
			var url = '{:urlencode(U(\'Upload/uphtml5?fileUrl=\'.$fileUrl.\'&fileType=\'.$fileType.\'\'))}';
			var jsurl="__JS__/uploadsFile/upload.js.php?id=classUp&UpFileUrl="+UpFileUrl+"&url="+url+"&rand="+Math.random();
			$.getScript(jsurl)
			$('#classUp').fadeIn(500);
		});
		$('.zy-close').click(function (){
			setTimeout("$('#classUp').fadeOut(500); location.reload(false)", 500);
		});
		$('#rapidClose').click(function (){
			$('#classUp').fadeOut(300);
		});
	});
</script>


</body>
<!-- END BODY -->
</html>